package com.yzd.learnjava.generics;

import java.util.EnumSet;
import java.util.Set;

import com.yzd.learnjava.util.Print;
import com.yzd.learnjava.util.Sets;

public class WaterColorsSets {
	public static void main(String[] args) {
		Set<WaterColors> set1 = EnumSet.range(WaterColors.BRILLIANT_RED, WaterColors.VIRIDIAN_HUE);
		Set<WaterColors> set2 = EnumSet.range(WaterColors.CERULEAN_BLUE_HUE, WaterColors.BURNT_UMAER);
		
		Print.print("set1 : " + set1);
		Print.print("set2 : " + set2);
		
		Print.print("union(set1 , set2) : " + Sets.unino(set1, set2));
		
		Set<WaterColors> subSet = Sets.interSection(set1, set2);
		Print.print("interSection(set1 , set2) : " + subSet);
		
		Print.print("difference(set1 , set2) : " + Sets.difference(set1, set2));
		
		Print.print("difference(set1 , subSet) : " + Sets.difference(set1, subSet));
		Print.print("difference(set2 , subSet) : " + Sets.difference(set2, subSet));
		
		Print.print("complement(set2 , subSet) : " + Sets.complement(set2, subSet));
	}
	
	
}
